package by.grsu.hdm.media;

import java.util.ArrayList;
import java.util.List;

import by.grsu.hdm.exception.EmptyPlayListException;

public class MediaPlayer {
	List<IHasMediaData> files = new ArrayList<IHasMediaData>();
	
	public MediaPlayer()
	{
		
	}
	
	public void addFile(IHasMediaData newFile)
	{
		files.add(newFile);
	}
	
	public void play() throws EmptyPlayListException
	{
		if(files.size() == 0)
			throw new EmptyPlayListException("List of Played Files is Empty!");
		for(IHasMediaData file : files)
		{
			System.out.println( "Play -> Name- " + file.getMedia().getName() + " \n" +
					" Author- " +file.getMedia().getAuthor());
		}
	}
	public void stop()
	{
		System.out.println( "Stop Media Player");
	}
	public void pause()
	{	
		System.out.println( "pause Media Player");
	}
}
